package entities;

import java.io.Serializable;

/**
 * Objecto que contem informacoes sobre um servidor
 * de base de dados
 * 
 * @author Leonardo Lino Nº45340
 * @author Diogo Pires Nº40351
 */
public class ServerInfo implements Serializable{
	private String address;
	private String bindName;
	private int port;
	private int id;
	private int idReplic;
	private int idCoordinator;
	private boolean available;
	private boolean inMaintenance;
	private Range main;
	private Range replic;
	private Range coordinator;
	
	public ServerInfo(String address, int port, int id){
		this.address = address;
		this.port = port;
		this.id = id;
		this.inMaintenance = false;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean isAvailable() {
		return available;
	}

	public void setAvailable(boolean available) {
		this.available = available;
	}
	
	public boolean isInMaintenance() {
		return inMaintenance;
	}

	public void setInMaintenance(boolean inMaintenance) {
		this.inMaintenance = inMaintenance;
	}

	public Range getMainRange() {
		return main;
	}

	public void setMainRange(Range main) {
		this.main = main;
	}

	public Range getReplicRange() {
		return replic;
	}

	public void setReplicRange(Range replic) {
		this.replic = replic;
	}

	public String getBindName() {
		return bindName;
	}

	public void setBindName(String bindName) {
		this.bindName = bindName;
	}

	public int getIdReplic() {
		return idReplic;
	}

	public void setIdReplic(int idReplic) {
		this.idReplic = idReplic;
	}

	public int getIdCoordinator() {
		return idCoordinator;
	}

	public void setIdCoordinator(int idCoordinator) {
		this.idCoordinator = idCoordinator;
	}

	public Range getCoordinatorRange() {
		return coordinator;
	}

	public void setCoordinatorRange(Range coordinator) {
		this.coordinator = coordinator;
	}
	
}
